import {request} from '../utils/request'

export function selectAll(params) {
    return request({
        method: 'get',
        url: 'hospital',
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function countByNameLike(params) {
    return request({
        method: 'get',
        url: 'hospital/count/'+params.name,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function mohuselectAll(params) {
    return request({
        method: 'get',
        url: 'hospital/selectByName/'+params.name,
        data:params,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function selectById(params) {
    return request({
        method: 'get',
        url: 'hospital/' + params.id,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function updateById(params) {
    return request({
        method: 'post',
        url: 'hospital/update',
        data: params,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function insetHos(params) {
    return request({
        method: 'post',
        url: 'hospital/inset',
        data: params,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function deleHos(params) {
    return request({
        method: 'delete',
        url: 'hospital/delete/' + params.id,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

//审查表
export function insertById(params) {
    return request({
        method: 'post',
        url: 'check/inset',
        data: params,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function selectAllS(params) {
    return request({
        method: 'get',
        url: 'check',
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function deleHosS(params) {
    return request({
        method: 'delete',
        url: 'check/delete/' + params.id,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}